package com.atguigu.seckill.service.serviceImp;



import com.atguigu.seckill.mapper.GoodsMapper;
import com.atguigu.seckill.pojo.Goods;
import com.atguigu.seckill.service.IGoodsService;
import com.atguigu.seckill.vo.GoodsVo;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author sjj
 * @since 2021-04-13
 */
@Service
public class GoodsServiceImpl extends ServiceImpl<GoodsMapper, Goods> implements IGoodsService {

    @Resource
    private GoodsMapper goodsMapper;

    @Override
    public List<GoodsVo> getGoodsList() {
        return goodsMapper.getGoodsList();
    }

    public GoodsVo getGoodsDeatil(Long goodsId) {

        return goodsMapper.getGoodsDetail(goodsId);
    }
}
